package com.whfc.emp.cncit.entity;

import com.whfc.emp.cncit.constant.CncitConst;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Description:
 * @author: xugcheng
 * @version: 1.0
 * @date: 2019/10/24 17:09
 */
@Data
@NoArgsConstructor
public class CncitDwMsgRA extends CncitDwMsg {

    private String result;

    public CncitDwMsgRA(String deviceCode, String result) {
        this.deviceCode = deviceCode;
        this.result = result;
    }

    @Override
    public String getCmd() {
        return CncitConst.DW_CMD_RA;
    }

    @Override
    public int getDataLength() {
        //$08,RA,0,1,#\n
        return getCmd().length() + 1 + CncitConst.PLATFORM.length() + 1 + result.length() + 1 + 1;
    }
}
